package com.bustle.user.dto.address;

import javax.ejb.EJB;
import javax.ejb.Local;
import javax.ejb.Stateless;

import com.bustle.commons.Mapper;

@Local
public interface AddressDtoMapper extends Mapper<AddressDto, AddressDto>
{
  @Stateless
  static public class DefaultAddressDtoMapper implements AddressDtoMapper
  {
    @Override
    public AddressDto map(AddressDto aSource, AddressDto aDestination)
    {
      return dataToDtoMapConverter.map(dtoToDataMapConverter.convert(aSource), aDestination);
    }

    @EJB
    protected DtoToAddressMapConverter dtoToDataMapConverter;
    @EJB
    protected AddressToDtoMapConverter dataToDtoMapConverter;
  }
}
